<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>奇思妙想 </title>

    <style>

        table{
            border: red solid 1px;
        }
    </style>
</head>
<body>
    <table id="ta">
     <tr>
         <td>北京</td>
     </tr>
     <tr>
         <td id="sh">上海</td>
     </tr>
     <tr>
         <td>合肥</td>
     </tr>
     <tr>
         <td>南京</td>
     </tr>

    </table>

    <button id="btn">click</button>

    <script>



        let ta =document.getElementById("ta");
        let btn =document.getElementById("btn");
        let sh =document.getElementById("sh");

        btn.onclick =function(){
            sh.parentNode.removeChild(sh);
        }

        console.log(ta.childNodes)

      

    </script>
</body>
</html>